home *** CD-ROM | disk | FTP | other *** search
/ Floppyshop 2 / Floppyshop - 2.zip / Floppyshop - 2.iso / diskmags / 3565-4.665 / dmg-4625 / tutorial._12 / l8.asc < prev    next >
Text File  |  1987-04-21  |  1KB  |  30 lines

  1. 10 rem ------------------------------
  2. 20 rem -----                    -----
  3. 30 rem -----   SPRITE TESTER 4  -----
  4. 40 rem -----                    -----
  5. 50 rem ------------------------------
  6. 60 cls : key off : curs off : hide on 
  7. 70 if mode<>0 then mode 0
  8. 80 if length(1)=0 then load "lander.mbs"
  9. 90 print "Press a Key to Quit"
  10. 100 locate 0,5 : centre "Joystick Moves Sprite"
  11. 110 SPX=rnd(300)+10 : SPY=rnd(180)+10 : SPR=1 : MV=1
  12. 120 sprite 1,SPX,SPY,SPR
  13. 130 K$=""
  14. 140 repeat 
  15. 150 K$=inkey$
  16. 160 until joy<>0 or K$<>""
  17. 170 if K$<>"" then goto 290
  18. 180 if joy=1 then SPY=SPY-MV : SPR=1
  19. 190 if joy=2 then SPY=SPY+MV : SPR=5
  20. 200 if joy=4 then SPX=SPX-MV : SPR=7
  21. 210 if joy=8 then SPX=SPX+MV : SPR=3
  22. 220 if joy=5 then SPY=SPY-MV : SPX=SPX-MV : SPR=8
  23. 230 if joy=9 then SPY=SPY-MV : SPX=SPX+1 : SPR=2
  24. 240 if joy=6 then SPY=SPY+MV : SPX=SPX-MV : SPR=6
  25. 250 if joy=10 then SPY=SPY+MV : SPX=SPX+1 : SPR=4
  26. 260 if joy>=16 then boom : wait 10
  27. 270 sprite 1,SPX,SPY,SPR
  28. 280 goto 130
  29. 290 default : end 
  30.